import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooUserWalletApplyController } from '../../../controllers';
const uctoouserWalletApplyRouter = new Router();
const userWalletApplyController = new uctooUserWalletApplyController();

uctoouserWalletApplyRouter.post('/add', requireUser, userWalletApplyController.add);
uctoouserWalletApplyRouter.post('/edit', requireUser, rowLevelPermission('uctoo/user_wallet_apply'), userWalletApplyController.edit);
uctoouserWalletApplyRouter.post('/del', requireUser, rowLevelPermission('uctoo/user_wallet_apply'), userWalletApplyController.delete);

//For getting userWalletApply with permission control
uctoouserWalletApplyRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/user_wallet_apply'), userWalletApplyController.getSingle);
uctoouserWalletApplyRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/user_wallet_apply'), userWalletApplyController.getMany);
uctoouserWalletApplyRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/user_wallet_apply'), userWalletApplyController.getMany);

//#endregion AutoCreateCode
export default uctoouserWalletApplyRouter;
